﻿
Imports xmlctrl
Imports wfileis.data

Public Class rss2
    Inherits rss

    Public Shadows Const _pathidentity As String = network.pathSeperator + "rss2"

    Public Overrides Function pathidentity() As String
        Return _pathidentity
    End Function

    Protected Overrides Function createDescriptionRoot(ByVal context As httpContext) As xmlcontrol
        Return context.createControl(New container())
    End Function

    Protected Overrides Function createReplyInfo(ByVal context As httpContext) As xmlcontrol
        Return context.createControl(New xmltext())
    End Function

    Protected Overrides Function createInfoRoot(ByVal context As httpContext) As xmlcontrol
        Return context.createControl(New container())
    End Function

    Private Shared Function infoText(ByVal info As info, ByVal contentLength As Int64) As String
        Return truncate(info.text(), contentLength)
    End Function

    Protected Overrides Sub processInfoContent(ByVal context As httpContext, ByVal root As xmlcontrol, _
                                               ByVal info As info, ByVal contentLength As Long)
        Dim text As xmltext = Nothing
        text = context.createControl(New xmltext())
        text.text = htmlUtils.escape(infoText(info, contentLength) + " -- " + info.id)
        root.addchild(text)
    End Sub
End Class
